﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web.Admin
{
    public partial class information_detail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["id"] != null)
            {
                odsInformation.SelectParameters[0].DefaultValue = Request["id"].ToString();
                DetailsView1.DefaultMode = DetailsViewMode.ReadOnly;
                
            }
        }

        protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
        {
            if (e.Exception != null)
            {
                e.ExceptionHandled = true;
                e.KeepInInsertMode = true;
                lblError.Text = e.Exception.Message;
            }
            else
            {
                Response.Write("<script>alert('添加成功')</script>");
            }
        }
    }
}
